package com.sikaryofficial.backend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sikaryofficial.backend.domain.entity.UserAction;
import com.sikaryofficial.backend.domain.vo.infomation.ReceivedLikesVO;
import com.sikaryofficial.backend.mapper.UserActionMapper;
import com.sikaryofficial.backend.service.IUserActionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.sikaryofficial.backend.constant.MyStatisticsTypeEnum.LIKES_ARTICLE;

/**
 * 用户行为Service业务层处理
 * 
 * @author qinjinyuan
 * @date 2023-11-09
 */
@Service
public class UserActionServiceImpl extends ServiceImpl<UserActionMapper, UserAction> implements IUserActionService {
    @Autowired
    private UserActionMapper userActionMapper;

    @Override
    public List<ReceivedLikesVO> queryReceivedLikes() {
        return userActionMapper.queryReceivedLikes(LIKES_ARTICLE.getBusinessType());
    }
}
